package com.google.android.exoplayer2;

import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import androidx.annotation.Nullable;
import com.google.android.exoplayer2.drm.DrmInitData;
import com.google.android.exoplayer2.metadata.Metadata;
import com.google.android.exoplayer2.video.ColorInfo;
import com.huawei.appgallery.festivalanimation.particle.modifiers.SizeModifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import o.anr;

public final class Format implements Parcelable {
    public static final Creator<Format> CREATOR = new Creator<Format>() {
        public /* synthetic */ Object createFromParcel(Parcel parcel) {
            return ˎ(parcel);
        }

        public /* synthetic */ Object[] newArray(int i) {
            return ˏ(i);
        }

        public Format ˎ(Parcel parcel) {
            return new Format(parcel);
        }

        public Format[] ˏ(int i) {
            return new Format[i];
        }
    };
    @Nullable
    public final DrmInitData ʻ;
    @Nullable
    public final ColorInfo ʻॱ;
    public final List<byte[]> ʼ;
    public final int ʼॱ;
    @Nullable
    public final String ʽ;
    public final int ʽॱ;
    public final int ʾ;
    public final int ʿ;
    public final int ˈ;
    @Nullable
    public final Metadata ˊ;
    private int ˊˊ;
    public final long ˊॱ;
    public final int ˊᐝ;
    @Nullable
    public final String ˋ;
    @Nullable
    public final String ˋˊ;
    public final int ˋॱ;
    @Nullable
    public final String ˎ;
    public final int ˏ;
    public final int ˏॱ;
    public final int ͺ;
    @Nullable
    public final String ॱ;
    public final float ॱˊ;
    public final float ॱˋ;
    public final int ॱˎ;
    @Nullable
    public final String ॱॱ;
    @Nullable
    public final byte[] ॱᐝ;
    public final int ᐝ;
    public final int ᐝॱ;

    public static Format ˏ(@Nullable String str, @Nullable String str2, @Nullable String str3, int i, int i2, int i3, int i4, float f, @Nullable List<byte[]> list, int i5, float f2, @Nullable DrmInitData drmInitData) {
        return ˊ(str, str2, str3, i, i2, i3, i4, f, list, i5, f2, null, -1, null, drmInitData);
    }

    public static Format ˊ(@Nullable String str, @Nullable String str2, @Nullable String str3, int i, int i2, int i3, int i4, float f, @Nullable List<byte[]> list, int i5, float f2, byte[] bArr, int i6, @Nullable ColorInfo colorInfo, @Nullable DrmInitData drmInitData) {
        return new Format(str, null, null, str2, str3, i, i2, i3, i4, f, i5, f2, bArr, i6, colorInfo, -1, -1, -1, -1, -1, 0, null, -1, Long.MAX_VALUE, list, drmInitData, null);
    }

    public static Format ˎ(@Nullable String str, @Nullable String str2, @Nullable String str3, int i, int i2, int i3, int i4, @Nullable List<byte[]> list, @Nullable DrmInitData drmInitData, int i5, @Nullable String str4) {
        return ˋ(str, str2, str3, i, i2, i3, i4, -1, list, drmInitData, i5, str4);
    }

    public static Format ˋ(@Nullable String str, @Nullable String str2, @Nullable String str3, int i, int i2, int i3, int i4, int i5, @Nullable List<byte[]> list, @Nullable DrmInitData drmInitData, int i6, @Nullable String str4) {
        return ˏ(str, str2, str3, i, i2, i3, i4, i5, -1, -1, list, drmInitData, i6, str4, null);
    }

    public static Format ˏ(@Nullable String str, @Nullable String str2, @Nullable String str3, int i, int i2, int i3, int i4, int i5, int i6, int i7, @Nullable List<byte[]> list, @Nullable DrmInitData drmInitData, int i8, @Nullable String str4, @Nullable Metadata metadata) {
        return new Format(str, null, null, str2, str3, i, i2, -1, -1, SizeModifier.STABLE_STATE_SCALE, -1, SizeModifier.STABLE_STATE_SCALE, null, -1, null, i3, i4, i5, i6, i7, i8, str4, -1, Long.MAX_VALUE, list, drmInitData, metadata);
    }

    public static Format ˊ(@Nullable String str, String str2, int i, @Nullable String str3) {
        return ˊ(str, str2, i, str3, null);
    }

    public static Format ˊ(@Nullable String str, String str2, int i, @Nullable String str3, @Nullable DrmInitData drmInitData) {
        return ˏ(str, str2, null, -1, i, str3, -1, drmInitData, Long.MAX_VALUE, Collections.emptyList());
    }

    public static Format ˏ(@Nullable String str, @Nullable String str2, @Nullable String str3, int i, int i2, @Nullable String str4, int i3, @Nullable DrmInitData drmInitData, long j, List<byte[]> list) {
        return new Format(str, null, null, str2, str3, i, -1, -1, -1, SizeModifier.STABLE_STATE_SCALE, -1, SizeModifier.STABLE_STATE_SCALE, null, -1, null, -1, -1, -1, -1, -1, i2, str4, i3, j, list, drmInitData, null);
    }

    public static Format ˏ(@Nullable String str, @Nullable String str2, @Nullable String str3, int i, int i2, @Nullable List<byte[]> list, @Nullable String str4, @Nullable DrmInitData drmInitData) {
        return new Format(str, null, null, str2, str3, i, -1, -1, -1, SizeModifier.STABLE_STATE_SCALE, -1, SizeModifier.STABLE_STATE_SCALE, null, -1, null, -1, -1, -1, -1, -1, i2, str4, -1, Long.MAX_VALUE, list, drmInitData, null);
    }

    public static Format ˏ(@Nullable String str, @Nullable String str2, long j) {
        return new Format(str, null, null, str2, null, -1, -1, -1, -1, SizeModifier.STABLE_STATE_SCALE, -1, SizeModifier.STABLE_STATE_SCALE, null, -1, null, -1, -1, -1, -1, -1, 0, null, -1, j, null, null, null);
    }

    public static Format ˏ(@Nullable String str, @Nullable String str2, @Nullable String str3, int i, @Nullable DrmInitData drmInitData) {
        return new Format(str, null, null, str2, str3, i, -1, -1, -1, SizeModifier.STABLE_STATE_SCALE, -1, SizeModifier.STABLE_STATE_SCALE, null, -1, null, -1, -1, -1, -1, -1, 0, null, -1, Long.MAX_VALUE, null, drmInitData, null);
    }

    Format(@Nullable String str, @Nullable String str2, @Nullable String str3, @Nullable String str4, @Nullable String str5, int i, int i2, int i3, int i4, float f, int i5, float f2, @Nullable byte[] bArr, int i6, @Nullable ColorInfo colorInfo, int i7, int i8, int i9, int i10, int i11, int i12, @Nullable String str6, int i13, long j, @Nullable List<byte[]> list, @Nullable DrmInitData drmInitData, @Nullable Metadata metadata) {
        this.ॱ = str;
        this.ˎ = str2;
        this.ॱॱ = str3;
        this.ʽ = str4;
        this.ˋ = str5;
        this.ˏ = i;
        this.ᐝ = i2;
        this.ͺ = i3;
        this.ˏॱ = i4;
        this.ॱˊ = f;
        if (i5 == -1) {
            i5 = 0;
        }
        this.ˋॱ = i5;
        if (f2 == SizeModifier.STABLE_STATE_SCALE) {
            f2 = 1.0f;
        }
        this.ॱˋ = f2;
        this.ॱᐝ = bArr;
        this.ᐝॱ = i6;
        this.ʻॱ = colorInfo;
        this.ॱˎ = i7;
        this.ʼॱ = i8;
        this.ʿ = i9;
        if (i10 == -1) {
            i10 = 0;
        }
        this.ʽॱ = i10;
        if (i11 == -1) {
            i11 = 0;
        }
        this.ˈ = i11;
        this.ʾ = i12;
        this.ˋˊ = str6;
        this.ˊᐝ = i13;
        this.ˊॱ = j;
        if (list == null) {
            list = Collections.emptyList();
        }
        this.ʼ = list;
        this.ʻ = drmInitData;
        this.ˊ = metadata;
    }

    Format(Parcel parcel) {
        this.ॱ = parcel.readString();
        this.ˎ = parcel.readString();
        this.ॱॱ = parcel.readString();
        this.ʽ = parcel.readString();
        this.ˋ = parcel.readString();
        this.ˏ = parcel.readInt();
        this.ᐝ = parcel.readInt();
        this.ͺ = parcel.readInt();
        this.ˏॱ = parcel.readInt();
        this.ॱˊ = parcel.readFloat();
        this.ˋॱ = parcel.readInt();
        this.ॱˋ = parcel.readFloat();
        this.ॱᐝ = anr.ˋ(parcel) ? parcel.createByteArray() : null;
        this.ᐝॱ = parcel.readInt();
        this.ʻॱ = (ColorInfo) parcel.readParcelable(ColorInfo.class.getClassLoader());
        this.ॱˎ = parcel.readInt();
        this.ʼॱ = parcel.readInt();
        this.ʿ = parcel.readInt();
        this.ʽॱ = parcel.readInt();
        this.ˈ = parcel.readInt();
        this.ʾ = parcel.readInt();
        this.ˋˊ = parcel.readString();
        this.ˊᐝ = parcel.readInt();
        this.ˊॱ = parcel.readLong();
        int readInt = parcel.readInt();
        this.ʼ = new ArrayList(readInt);
        for (int i = 0; i < readInt; i++) {
            this.ʼ.add(parcel.createByteArray());
        }
        this.ʻ = (DrmInitData) parcel.readParcelable(DrmInitData.class.getClassLoader());
        this.ˊ = (Metadata) parcel.readParcelable(Metadata.class.getClassLoader());
    }

    public Format ˎ(int i) {
        return new Format(this.ॱ, this.ˎ, this.ॱॱ, this.ʽ, this.ˋ, this.ˏ, i, this.ͺ, this.ˏॱ, this.ॱˊ, this.ˋॱ, this.ॱˋ, this.ॱᐝ, this.ᐝॱ, this.ʻॱ, this.ॱˎ, this.ʼॱ, this.ʿ, this.ʽॱ, this.ˈ, this.ʾ, this.ˋˊ, this.ˊᐝ, this.ˊॱ, this.ʼ, this.ʻ, this.ˊ);
    }

    public Format ॱ(long j) {
        return new Format(this.ॱ, this.ˎ, this.ॱॱ, this.ʽ, this.ˋ, this.ˏ, this.ᐝ, this.ͺ, this.ˏॱ, this.ॱˊ, this.ˋॱ, this.ॱˋ, this.ॱᐝ, this.ᐝॱ, this.ʻॱ, this.ॱˎ, this.ʼॱ, this.ʿ, this.ʽॱ, this.ˈ, this.ʾ, this.ˋˊ, this.ˊᐝ, j, this.ʼ, this.ʻ, this.ˊ);
    }

    public Format ˋ(int i, int i2) {
        return new Format(this.ॱ, this.ˎ, this.ॱॱ, this.ʽ, this.ˋ, this.ˏ, this.ᐝ, this.ͺ, this.ˏॱ, this.ॱˊ, this.ˋॱ, this.ॱˋ, this.ॱᐝ, this.ᐝॱ, this.ʻॱ, this.ॱˎ, this.ʼॱ, this.ʿ, i, i2, this.ʾ, this.ˋˊ, this.ˊᐝ, this.ˊॱ, this.ʼ, this.ʻ, this.ˊ);
    }

    public Format ˏ(float f) {
        return new Format(this.ॱ, this.ˎ, this.ॱॱ, this.ʽ, this.ˋ, this.ˏ, this.ᐝ, this.ͺ, this.ˏॱ, f, this.ˋॱ, this.ॱˋ, this.ॱᐝ, this.ᐝॱ, this.ʻॱ, this.ॱˎ, this.ʼॱ, this.ʿ, this.ʽॱ, this.ˈ, this.ʾ, this.ˋˊ, this.ˊᐝ, this.ˊॱ, this.ʼ, this.ʻ, this.ˊ);
    }

    public Format ˋ(@Nullable DrmInitData drmInitData) {
        return new Format(this.ॱ, this.ˎ, this.ॱॱ, this.ʽ, this.ˋ, this.ˏ, this.ᐝ, this.ͺ, this.ˏॱ, this.ॱˊ, this.ˋॱ, this.ॱˋ, this.ॱᐝ, this.ᐝॱ, this.ʻॱ, this.ॱˎ, this.ʼॱ, this.ʿ, this.ʽॱ, this.ˈ, this.ʾ, this.ˋˊ, this.ˊᐝ, this.ˊॱ, this.ʼ, drmInitData, this.ˊ);
    }

    public Format ˏ(@Nullable Metadata metadata) {
        return new Format(this.ॱ, this.ˎ, this.ॱॱ, this.ʽ, this.ˋ, this.ˏ, this.ᐝ, this.ͺ, this.ˏॱ, this.ॱˊ, this.ˋॱ, this.ॱˋ, this.ॱᐝ, this.ᐝॱ, this.ʻॱ, this.ॱˎ, this.ʼॱ, this.ʿ, this.ʽॱ, this.ˈ, this.ʾ, this.ˋˊ, this.ˊᐝ, this.ˊॱ, this.ʼ, this.ʻ, metadata);
    }

    public int ˊ() {
        return (this.ͺ == -1 || this.ˏॱ == -1) ? -1 : this.ͺ * this.ˏॱ;
    }

    public String toString() {
        return "Format(" + this.ॱ + ", " + this.ˎ + ", " + this.ॱॱ + ", " + this.ʽ + ", " + this.ˋ + ", " + this.ˏ + ", " + this.ˋˊ + ", [" + this.ͺ + ", " + this.ˏॱ + ", " + this.ॱˊ + "], [" + this.ॱˎ + ", " + this.ʼॱ + "])";
    }

    public int hashCode() {
        int i = 0;
        if (this.ˊˊ == 0) {
            int hashCode = ((this.ˊ == null ? 0 : this.ˊ.hashCode()) + (((this.ʻ == null ? 0 : this.ʻ.hashCode()) + (((((this.ˋˊ == null ? 0 : this.ˋˊ.hashCode()) + (((((((((((((this.ˋ == null ? 0 : this.ˋ.hashCode()) + (((this.ʽ == null ? 0 : this.ʽ.hashCode()) + (((this.ॱॱ == null ? 0 : this.ॱॱ.hashCode()) + (((this.ॱ == null ? 0 : this.ॱ.hashCode()) + 527) * 31)) * 31)) * 31)) * 31) + this.ˏ) * 31) + this.ͺ) * 31) + this.ˏॱ) * 31) + this.ॱˎ) * 31) + this.ʼॱ) * 31)) * 31) + this.ˊᐝ) * 31)) * 31)) * 31;
            if (this.ˎ != null) {
                i = this.ˎ.hashCode();
            }
            this.ˊˊ = ((((((((((((((((((((hashCode + i) * 31) + this.ᐝ) * 31) + ((int) this.ˊॱ)) * 31) + Float.floatToIntBits(this.ॱˊ)) * 31) + Float.floatToIntBits(this.ॱˋ)) * 31) + this.ˋॱ) * 31) + this.ᐝॱ) * 31) + this.ʿ) * 31) + this.ʽॱ) * 31) + this.ˈ) * 31) + this.ʾ;
        }
        return this.ˊˊ;
    }

    public boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        Format format = (Format) obj;
        if (this.ˊˊ != 0 && format.ˊˊ != 0 && this.ˊˊ != format.ˊˊ) {
            return false;
        }
        if (this.ˏ == format.ˏ && this.ᐝ == format.ᐝ && this.ͺ == format.ͺ && this.ˏॱ == format.ˏॱ && Float.compare(this.ॱˊ, format.ॱˊ) == 0 && this.ˋॱ == format.ˋॱ && Float.compare(this.ॱˋ, format.ॱˋ) == 0 && this.ᐝॱ == format.ᐝॱ && this.ॱˎ == format.ॱˎ && this.ʼॱ == format.ʼॱ && this.ʿ == format.ʿ && this.ʽॱ == format.ʽॱ && this.ˈ == format.ˈ && this.ˊॱ == format.ˊॱ && this.ʾ == format.ʾ && anr.ˎ(this.ॱ, format.ॱ) && anr.ˎ(this.ˎ, format.ˎ) && anr.ˎ(this.ˋˊ, format.ˋˊ) && this.ˊᐝ == format.ˊᐝ && anr.ˎ(this.ॱॱ, format.ॱॱ) && anr.ˎ(this.ʽ, format.ʽ) && anr.ˎ(this.ˋ, format.ˋ) && anr.ˎ(this.ʻ, format.ʻ) && anr.ˎ(this.ˊ, format.ˊ) && anr.ˎ(this.ʻॱ, format.ʻॱ) && Arrays.equals(this.ॱᐝ, format.ॱᐝ) && ॱ(format)) {
            return true;
        }
        return false;
    }

    public boolean ॱ(Format format) {
        if (this.ʼ.size() != format.ʼ.size()) {
            return false;
        }
        for (int i = 0; i < this.ʼ.size(); i++) {
            if (!Arrays.equals((byte[]) this.ʼ.get(i), (byte[]) format.ʼ.get(i))) {
                return false;
            }
        }
        return true;
    }

    public int describeContents() {
        return 0;
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(this.ॱ);
        parcel.writeString(this.ˎ);
        parcel.writeString(this.ॱॱ);
        parcel.writeString(this.ʽ);
        parcel.writeString(this.ˋ);
        parcel.writeInt(this.ˏ);
        parcel.writeInt(this.ᐝ);
        parcel.writeInt(this.ͺ);
        parcel.writeInt(this.ˏॱ);
        parcel.writeFloat(this.ॱˊ);
        parcel.writeInt(this.ˋॱ);
        parcel.writeFloat(this.ॱˋ);
        anr.ˎ(parcel, this.ॱᐝ != null);
        if (this.ॱᐝ != null) {
            parcel.writeByteArray(this.ॱᐝ);
        }
        parcel.writeInt(this.ᐝॱ);
        parcel.writeParcelable(this.ʻॱ, i);
        parcel.writeInt(this.ॱˎ);
        parcel.writeInt(this.ʼॱ);
        parcel.writeInt(this.ʿ);
        parcel.writeInt(this.ʽॱ);
        parcel.writeInt(this.ˈ);
        parcel.writeInt(this.ʾ);
        parcel.writeString(this.ˋˊ);
        parcel.writeInt(this.ˊᐝ);
        parcel.writeLong(this.ˊॱ);
        int size = this.ʼ.size();
        parcel.writeInt(size);
        for (int i2 = 0; i2 < size; i2++) {
            parcel.writeByteArray((byte[]) this.ʼ.get(i2));
        }
        parcel.writeParcelable(this.ʻ, 0);
        parcel.writeParcelable(this.ˊ, 0);
    }
}
